package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    /*
     * 多条件查询购物车列表
     * */
    List<ShoppingCart> selectByCondition(ShoppingCart shoppingCart);

    /*
     * 更新购物车数据
     * */
    @Update("update  shopping_cart set number =#{number} where id=#{id}")
    void update(ShoppingCart updateShoppingCart);

    /*
     * 添加购物车数据
     * */
    void insert(ShoppingCart addShoppingCart);

    /*
     *清空购物车
     *
     * */
    void clean(Long currentId);

    /*
     * 删除
     *
     * */
    void deleteById(ShoppingCart modify);
}
